import { CustomPage } from '/engine/index';

CustomPage({
  data: {
    visibleExit: false,
  },
  onLoad() {},
  onClickExit() {
    this.setData({ visibleExit: true });
  },
  onNavigateToUser() {
    wx.navigateTo({ url: '/pages/user-agreement/index' });
  },
  onNavigateToPrivacy() {
    wx.navigateTo({ url: '/pages/privacy-policy/index' });
  },
  onCancel() {
    this.setData({ visibleExit: false });
  },
  onConfirm() {
    wx.removeStorageSync('access_token');
    this.setData({ visibleExit: false });
    wx.redirectTo({ url: '/pages/login/index' });
  },
});
